<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>LCV Framework: test-dip.c Quellcode</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Erzeugt von Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Hauptseite</span></a></li>
    <li><a href="classes.html"><span>Datenstrukturen</span></a></li>
    <li class="current"><a href="files.html"><span>Dateien</span></a></li>
  </ul>
</div>
<h1>test-dip.c</h1><a href="test-dip_8c.html">gehe zur Dokumentation dieser Datei</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include "<a class="code" href="dip_8h.html" title="Digital Image Processing Funktionen.">lcv/dip.h</a>"</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include "<a class="code" href="bmp_8h.html" title="Funktionen zum Schreiben und lesen des Bitmap Headers.">lcv/bmp.h</a>"</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include "<a class="code" href="cam_8h.html" title="Definiert die abstrakte Schnittstelle zur Kamera.">lcv/cam.h</a>"</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include "<a class="code" href="config_8h.html">config.h</a>"</span>
<a name="l00006"></a>00006 
<a name="l00007"></a><a class="code" href="test-dip_8c.html#904abd06dcdc391c228a4ff586d7d43e">00007</a> <span class="keywordtype">void</span> <a class="code" href="test-dip_8c.html#904abd06dcdc391c228a4ff586d7d43e">test_dip</a>()
<a name="l00008"></a>00008 {
<a name="l00009"></a>00009         printf(<span class="stringliteral">"capturing frame (should have been tested before)... "</span>);
<a name="l00010"></a>00010         fflush(stdout);
<a name="l00011"></a>00011         <a class="code" href="structlcv__picture.html" title="Bilderstruktur für unsigned 8-bit Bilder.">lcv_picture</a> picture = <a class="code" href="cam-linux32_8c.html#abd5b4037cc6f83069eaf5718d5ed872" title="Holt ein Bild von der Kamera.">lcv_capture_frame</a>(<a class="code" href="config_8h.html#3d3267b8ecabd35fd473c13d616e53d9">FULLSIZE_INPUT_IMAGE</a>);
<a name="l00012"></a>00012         printf(<span class="stringliteral">"ok\n"</span>);
<a name="l00013"></a>00013         
<a name="l00014"></a>00014         printf(<span class="stringliteral">"writing invert bmp... "</span>);
<a name="l00015"></a>00015         fflush(stdout);
<a name="l00016"></a>00016         <a class="code" href="structlcv__picture.html" title="Bilderstruktur für unsigned 8-bit Bilder.">lcv_picture</a> p_invert = <a class="code" href="dip_8c.html#44ed40cd097d1bfce8480855457071ae" title="Invertiert Bild.">lcv_invert</a>(&amp;picture);
<a name="l00017"></a>00017         <a class="code" href="bmp_8c.html#460186983c9e59d93ee69a459c5d0815" title="Speichert ein lcv_picture Strukt im BMP-Format ab.">lcv_write_bmp</a>(p_invert, <span class="stringliteral">"dip_inverted.bmp"</span>);
<a name="l00018"></a>00018         printf(<span class="stringliteral">"ok\n"</span>);
<a name="l00019"></a>00019         
<a name="l00020"></a>00020         printf(<span class="stringliteral">"writing reversed bmp... "</span>);
<a name="l00021"></a>00021         fflush(stdout);
<a name="l00022"></a>00022         <a class="code" href="structlcv__picture.html" title="Bilderstruktur für unsigned 8-bit Bilder.">lcv_picture</a> p_reverse = <a class="code" href="dip_8c.html#68b064713e293ce23b6d9f5023449928" title="Spiegelt Bild.">lcv_reverse</a>(&amp;picture);
<a name="l00023"></a>00023         <a class="code" href="bmp_8c.html#460186983c9e59d93ee69a459c5d0815" title="Speichert ein lcv_picture Strukt im BMP-Format ab.">lcv_write_bmp</a>(p_reverse, <span class="stringliteral">"dip_reversed.bmp"</span>);
<a name="l00024"></a>00024         printf(<span class="stringliteral">"ok\n"</span>);
<a name="l00025"></a>00025         
<a name="l00026"></a>00026         printf(<span class="stringliteral">"writing gray bmp... "</span>);
<a name="l00027"></a>00027         fflush(stdout);
<a name="l00028"></a>00028         <a class="code" href="structlcv__picture.html" title="Bilderstruktur für unsigned 8-bit Bilder.">lcv_picture</a> p_gray = <a class="code" href="dip_8c.html#d04debfd2555f7c1a887bb29f2d18e94" title="Wandelt ein 24Bit BGR Bild in ein 8Bit Graustufenbild um.">lcv_rgb2gray</a>(&amp;picture);    
<a name="l00029"></a>00029         <a class="code" href="bmp_8c.html#460186983c9e59d93ee69a459c5d0815" title="Speichert ein lcv_picture Strukt im BMP-Format ab.">lcv_write_bmp</a>(p_gray, <span class="stringliteral">"dip_gray.bmp"</span>);
<a name="l00030"></a>00030         printf(<span class="stringliteral">"ok\n"</span>);
<a name="l00031"></a>00031         
<a name="l00032"></a>00032         printf(<span class="stringliteral">"writing gray inverted bmp... "</span>);
<a name="l00033"></a>00033         fflush(stdout);
<a name="l00034"></a>00034         <a class="code" href="structlcv__picture.html" title="Bilderstruktur für unsigned 8-bit Bilder.">lcv_picture</a> p_gray_inv = <a class="code" href="dip_8c.html#44ed40cd097d1bfce8480855457071ae" title="Invertiert Bild.">lcv_invert</a>(&amp;p_gray);
<a name="l00035"></a>00035         <a class="code" href="bmp_8c.html#460186983c9e59d93ee69a459c5d0815" title="Speichert ein lcv_picture Strukt im BMP-Format ab.">lcv_write_bmp</a>(p_gray_inv, <span class="stringliteral">"dip_gray_inverted.bmp"</span>);
<a name="l00036"></a>00036         printf(<span class="stringliteral">"ok\n"</span>);
<a name="l00037"></a>00037         
<a name="l00038"></a>00038         printf(<span class="stringliteral">"writing gray reversed bmp... "</span>);
<a name="l00039"></a>00039         fflush(stdout);
<a name="l00040"></a>00040         <a class="code" href="structlcv__picture.html" title="Bilderstruktur für unsigned 8-bit Bilder.">lcv_picture</a> p_gray_rev = <a class="code" href="dip_8c.html#68b064713e293ce23b6d9f5023449928" title="Spiegelt Bild.">lcv_reverse</a>(&amp;p_gray);
<a name="l00041"></a>00041         <a class="code" href="bmp_8c.html#460186983c9e59d93ee69a459c5d0815" title="Speichert ein lcv_picture Strukt im BMP-Format ab.">lcv_write_bmp</a>(p_gray_rev, <span class="stringliteral">"dip_gray_reversed.bmp"</span>);
<a name="l00042"></a>00042         fflush(stdout);
<a name="l00043"></a>00043         printf(<span class="stringliteral">"ok\n"</span>);
<a name="l00044"></a>00044         
<a name="l00045"></a>00045         printf(<span class="stringliteral">"averange value of gray... %u\n"</span>, <a class="code" href="dip_8c.html#e5f25b2e1cb17f96c78edb030c185087" title="Berechnet den Durchschnittswert eines Bildes.">lcv_avg_value</a>(&amp;p_gray));
<a name="l00046"></a>00046         printf(<span class="stringliteral">"averange value of inverted gray... %u\n"</span>, <a class="code" href="dip_8c.html#e5f25b2e1cb17f96c78edb030c185087" title="Berechnet den Durchschnittswert eines Bildes.">lcv_avg_value</a>(&amp;p_gray_inv));
<a name="l00047"></a>00047 }
</pre></div><hr size="1"><address style="text-align: right;"><small>Erzeugt am Thu Dec 13 14:01:49 2007 für LCV Framework von&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>
